package com.dlh.rocketmq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/rocketmq")
public class RocketMqController {
    @Autowired
    private  RocketMQProducer rocketMQProducer;
    @PostMapping
    public ResponseEntity createProduct() {
        rocketMQProducer.send("test-topic", "test");
        return ResponseEntity.ok().build();
    }

}
